\hypertarget{classAuth__Login}{
\section{Auth\_\-Login Class Reference}
\label{classAuth__Login}\index{Auth\_\-Login@{Auth\_\-Login}}
}


Class with static authentication methods.  
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \hyperlink{classAuth__Login_aac9acd697518b5b78610f8ec6d418175}{startSession} ()
\begin{DoxyCompactList}\small\item\em Statically starts a session. \item\end{DoxyCompactList}\item 
static \hyperlink{classAuth__Login_a636b8eb41420857004dc31a944f3e24d}{checkCredentials} ()
\begin{DoxyCompactList}\small\item\em Checks if user credentials are valid. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Class with static authentication methods. {\bfseries English}

This class mainly implements (statical) functions for Authentication issues, therefore there is no constructor; It's simply a container for starting sessions and for checking credentials.

{\bfseries Italiano}

Questa classe implementa principalmente funzioni atte all'autenticazione, pertanto non vi è definito un costruttore; Si tratta di un semplice contenitore di metodi per avviare sessioni e per il controllo delle credenziali.

\begin{DoxyAuthor}{Author}
Gianluca Bargelli 
\end{DoxyAuthor}


\subsection{Member Function Documentation}
\hypertarget{classAuth__Login_a636b8eb41420857004dc31a944f3e24d}{
\index{Auth\_\-Login@{Auth\_\-Login}!checkCredentials@{checkCredentials}}
\index{checkCredentials@{checkCredentials}!Controller_Login_Login@{Auth\_\-Login}}
\subsubsection[{checkCredentials}]{\setlength{\rightskip}{0pt plus 5cm}static Auth\_\-Login::checkCredentials ()\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classAuth__Login_a636b8eb41420857004dc31a944f3e24d}


Checks if user credentials are valid. {\bfseries English}

Performs a database check with \$\_\-POST\mbox{[}'username'\mbox{]} and \$\_\-POST\mbox{[}'password'\mbox{]}; If POST vars are empty then it checks if there's a valid session, else redirects to a login page.

{\bfseries Italiano}

Effettua un controllo sul database con le variabili \$\_\-POST\mbox{[}'username'\mbox{]} e \$\_\-POST\mbox{[}'password'\mbox{]}; Se le variabili POST passate sono vuote controlla se esiste una sessione ancora valida, altrimenti effettua il redirect verso una pagina di login.

\begin{Desc}
\item[\hyperlink{todo__todo000001}{Todo}]-\/Fai ritornare un boolean per usarlo più liberamente. 

-\/Eliminare il modello User e implementare la funzione userRole() come metodo statico di \hyperlink{classAuth__Login}{Auth\_\-Login} \end{Desc}
\hypertarget{classAuth__Login_aac9acd697518b5b78610f8ec6d418175}{
\index{Auth\_\-Login@{Auth\_\-Login}!startSession@{startSession}}
\index{startSession@{startSession}!Controller_Login_Login@{Auth\_\-Login}}
\subsubsection[{startSession}]{\setlength{\rightskip}{0pt plus 5cm}static Auth\_\-Login::startSession ()\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classAuth__Login_aac9acd697518b5b78610f8ec6d418175}


Statically starts a session. {\bfseries English}

Starts a session by creating a new \hyperlink{classModels__Session}{Models\_\-Session} item; It statically istantiates a new Session with database connection parameters injected into the constructor. Having no global scope, \$session variable is lost after calling the method.

{\bfseries Italiano}

Lancia una sessione creando un nuovo oggetto \hyperlink{classModels__Session}{Models\_\-Session}; Istanzia staticamente una nuova sessione con i parametri per la connessione al database passati tramite costruttore. Non avendo uno scope globale la variabile \$session è persa dopo la chiamata del metodo. 

The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
/home/bargio/Progetti/hooligan/Auth/Auth\_\-Login.php\end{DoxyCompactItemize}
